package com.ruoyi.caigou.api.factory;

import com.ruoyi.caigou.api.RemoteBuyBackReqService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.caigou.BuyBackReq;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteBuyBackReqFallbackFactory implements FallbackFactory<RemoteBuyBackReqService> {

    @Override
    public RemoteBuyBackReqService create(Throwable cause) {
        return new RemoteBuyBackReqService() {


            @Override
            public AjaxResult updateStatusByCode(BuyBackReq buyBackReq) {
                return AjaxResult.error("请求失败");
            }

            @Override
            public AjaxResult getInfoByCode(String code) {
                return AjaxResult.error("请求失败");
            }
        };
    }
}
